<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<meta name="layout" content="main" />
	<title>Itens</title>
	
	<style type="text/css">
		.item {
			text-align: left;
			width: 800px;
			height: 300px;
			padding: 10px;
			margin: 30px;
			background-color: #CCC;
		}
		
		.item input[type=checkbox] {
			width: 30px;
			position: relative;
			left: 46%;
			bottom: -40%;
		}
		
		.item img {
			float: right;
			max-width: 400px;
			max-height: 290px;
			margin-left: 10px;
		}
	</style>
</head>
<body>
	<h1>Itens</h1>

	<g:form>
		<g:each in="${itemInstanceList}" status="i" var="item">
			<div class="item">
				<g:link action="show" id="${item.id}"><img src="${resource(file: item.foto)}"/></g:link>
				
				<p>Nome: ${item.nome}</p>
				<p>Categoria: ${item.categoria}</p>
				<p>Descrição: ${item.descricao}</p>
				<p>Preço: ${item.preco}</p>
				
				<g:checkBox name="cbItem" checked="false" value="${item.id}" />
			</div>
		</g:each>
		
		<g:actionSubmit action="delete" value="Excluir Selecionados" onclick="return confirm('Tem certeza?');" />
	</g:form>
</body>
</html>
